package com.coocaa.ops.api.v1.policy.util;

import com.coocaa.ops.api.common.model.HeaderModel;
import com.coocaa.ops.api.v1.policy.model.DeviceInfoModel;

/**
 * @author tangminghong
 * @date 2020-06-23
 */
public class PolicyQueryUtil {

    public static DeviceInfoModel convertToDeviceInfo(HeaderModel header) {
        if (header == null) {
            return new DeviceInfoModel("","");
        }

        String chip = header.getCChip();
        chip = chip == null ? "" : chip;
        String model = header.getCModel();
        model = model == null ? "" : model;

        return new DeviceInfoModel(chip, model);
    }
}
